Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove core imports from dbt.artifacts component #9694

Merged
merged 6 commits into from
Apr 15, 2024

Conversation

MichelleArk
Copy link
Contributor

@MichelleArk MichelleArk commented Feb 28, 2024

resolves ##9926

Problem

Non dbt.artifacts imports from dbt.* in dbt/artifacts represent circular dependencies if dbt/artifacts were to be pulled out as a standalone package from dbt-core.

Solution

This PR is best to review commit-by-commit!

Remove as many dbt.* core imports as possible in this PR. This has included:

  • dbt.contracts.graph.utils.validate_color: 67ae735
  • dbt.contracts.graph.nodes.CompiledNode: 399b0ba
  • dbt.logger: 866fe5b
  • dbt.exceptions: 866fe5b

Outstanding dependencies:

  • dbt.version
  • dbt.contracts.graph.nodes.ResultNode

These are going to be a higher lift and I'd like to tackle them in a follow-on to prevent this PR from getting too large in scope.

Checklist

  • I have read the contributing guide and understand what's expected of me
  • I have run this code in development and it appears to resolve the stated issue
  • This PR includes tests, or tests are not required/relevant for this PR
  • This PR has no interface changes (e.g. macros, cli, logs, json artifacts, config files, adapter interface, etc) or this PR has already received feedback and approval from Product or DX
  • This PR includes type annotations for new and modified functions

@cla-bot cla-bot bot added the cla:yes label Feb 28, 2024
Copy link
Contributor

Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide.

Copy link

codecov bot commented Feb 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.08%. Comparing base (99d033f) to head (83400c3).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9694   +/-   ##
=======================================
  Coverage   88.08%   88.08%           
=======================================
  Files         178      180    +2     
  Lines       22459    22457    -2     
=======================================
  Hits        19782    19782           
+ Misses       2677     2675    -2     
Flag Coverage Δ
integration 85.43% <100.00%> (-0.02%) ⬇️
unit 61.82% <60.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@MichelleArk MichelleArk added the artifact_minor_upgrade To bypass the CI check by confirming that the change is not breaking label Feb 28, 2024
@MichelleArk MichelleArk changed the title define validate_color in dbt.artifacts.utils Remove core imports from dbt.artifacts component Apr 12, 2024
@MichelleArk MichelleArk marked this pull request as ready for review April 12, 2024 20:36
@MichelleArk MichelleArk requested a review from a team as a code owner April 12, 2024 20:36
@MichelleArk MichelleArk requested review from QMalcolm and gshank April 12, 2024 21:01
Copy link
Contributor

@gshank gshank left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice cleanup.

@MichelleArk MichelleArk merged commit 607646b into main Apr 15, 2024
64 checks passed
@MichelleArk MichelleArk deleted the decouple-artifacts-from-core branch April 15, 2024 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
artifact_minor_upgrade To bypass the CI check by confirming that the change is not breaking cla:yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants